import Layout from '../BackAnd/Layout'

let routes = [
  //仪表盘
  {
    path: '/',
    component: Layout,
    redirect: { path: '/dashboard' },
    meta: {
      title: '根目录',
      icon: 'el-icon-phone-outline',
      hidden: true,
    },
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        meta: {
          title: '仪表盘',
          icon: 'el-icon-user',
        },
        component: () => import('../views/dashboard'),
      },
    ],
  },
  //仪表盘
  // {
  //   path: '/ceshi',
  //   component: Layout,
  //   meta: {
  //     title: '根目录',
  //     icon: 'el-icon-phone-outline',
  //     hidden: true,
  //   },
  //   children: [
  //     {
  //       path: 'ceshi',
  //       name: 'dashboard',
  //       meta: {
  //         title: '测试',
  //         icon: 'el-icon-user',
  //       },
  //       component: () => import('../views/ceshi'),
  //     },
  //   ],
  // },
  {
    path:'/login',
    component:()=>import('../views/login'),
    meta:{
      title:'登录',
      icon:'el-icon-warning',
      hidden:true
    },
  },
  //用户管理
  {
    path: '/UserSettings',
    component: Layout,
    name: 'UserSettings',
    meta: {
      title: '用户管理',
      icon: 'el-icon-goods',
    },
    children: [
      {
        path: 'UserList',
        name: 'UserList',
        meta: {
          title: '用户列表',
          icon: 'el-icon-warning-outline',
        },
        component: () => import('../views/userList'),
      },
    ],
  },
  //商品管理
  {
    path: '/GoodsRegulate',
    component: Layout,
    meta: {
      title: '商品管理',
      icon: 'el-icon-edit-outline'
    },
    children: [
      {
        path: 'GoodsList',
        meta: {
          title: '商品列表',
          icon: 'el-icon-date'
        },
        component: () => import('../views/Goods')
      },
      {
        path: 'GoodsSort',
        meta: {
          title: '商品品类',
          icon: "el-icon-date"
        },
        component: () => import('../views/GoodsSort')
      },
      {
        path: 'AddGoods',
        meta: {
          title: '添加商品',
          icon: "el-icon-date"
        },
        component: () => import('../views/AddGoods')
      }
    ]
  },
  //品牌管理
  {
    path: '/BrandRegulate',
    component: Layout,
    meta: {
      title: '品牌管理',
      icon: 'el-icon-edit-outline'
    },
    children: [
      {
        path: 'BrandsList',
        meta: {
          title: '品牌列表',
          icon: 'el-icon-date'
        },
        component: () => import('../views/Brand')
      },
    ]
  },
  //订单管理
  {
    path: '/oms',
    component: Layout,
    meta: {
      title: '订单管理',
      icon: 'el-icon-date',
    },
    children: [
      {
        path: 'OmsList',
        meta: {
          title: '订单列表',
          icon: 'el-icon-date'
        },
        component: () => import('../views/OmsList')
      }
    ]
  },
  //供应商管理
  {
    path: '/Supplier',
    component: Layout,
    meta: {
      title: '供应商设置',
      icon: 'el-icon-date',
      hidden: true
    },
    children: [
      {
        path: 'supplier',
        name: 'supplier',
        meta: {
          title: '供应商管理',
          icon: 'el-icon-edit-outline'
        },
        component: () => import('../views/Supplier'),
      }
    ]
  },
  //商家管理
  {
    path: '/Shop',
    component: Layout,
    meta: {
      title: '商家管理',
      icon: 'el-icon-date',
      hidden: true
    },
    children: [
      {
        path: 'Shop',
        name: 'Shop',
        meta: {
          title: '商家管理',
          icon: 'el-icon-edit-outline'
        },
        component: () => import('../views/Shop'),
      }
    ]
  },
  //轮播图管理
  // {
  //   path: '/chat',
  //   meta: {
  //     title: '轮播图管理',
  //     icon: "el-icon-date",
  //     hidden: true
  //   },
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'chat',
  //       meta: {
  //         title: "轮播图管理",
  //         icon: "el-icon-date",
  //       },
  //       component: () => import('../views/chat')
  //     }
  //   ]
  // }

]

export default routes
